package org.hy.domain.group;

import java.util.Date;
import java.util.List;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hy.domain.ug.ShareablePost;

import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.thoughtworks.xstream.annotations.XStreamInclude;
import com.thoughtworks.xstream.converters.basic.BooleanConverter;
import com.thoughtworks.xstream.converters.basic.NullConverter;

/**
 * 讨论
 * 
 * @author xwm
 * 
 */

public class GDiscuss extends ShareablePost {

	@XStreamConverter(value=BooleanConverter.class,booleans={false},strings={"yes","no"})
	private Boolean gWisdomTag;
	private Date postTime;
	
	
	private Date solveTime;
	
	

	private List<GAnswer> answers;

	public Boolean getgWisdomTag() {
		return gWisdomTag;
	}

	public void setgWisdomTag(Boolean gWisdomTag) {
		this.gWisdomTag = gWisdomTag;
	}

	public Date getPostTime() {
		return postTime;
	}

	public void setPostTime(Date postTime) {
		this.postTime = postTime;
	}

	public Date getSolveTime() {
		return solveTime;
	}

	public void setSolveTime(Date solveTime) {
		this.solveTime = solveTime;
	}

	public List<GAnswer> getAnswers() {
		return answers;
	}

	public void setAnswers(List<GAnswer> answers) {
		this.answers = answers;
	}

	
	
	public void addAnswer(GAnswer e) {
		 answers.add(e);
	}

	public void removeAnswer(GAnswer e) {
		 answers.add(e);
	}
	
	@Override
	public void buildToString(ToStringBuilder builder) {
		super.buildToString(builder);
		builder.append("answers",answers);
	}
	
}
